package InterviewPractise.JAVAForSQL.Entity;

import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 5/20/11
 * Time: 10:04 AM
 * To change this template use File | Settings | File Templates.
 */
public class Table2Eneity {

    private Integer id;
    private Date field1;
    private String field2;
    private Date field3;
    private Integer field4;
    private Integer field5;
    private Table1Entity table1;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getField1() {
        return field1;
    }

    public void setField1(Date field1) {
        this.field1 = field1;
    }

    public String getField2() {
        return field2;
    }

    public void setField2(String field2) {
        this.field2 = field2;
    }

    public Date getField3() {
        return field3;
    }

    public void setField3(Date field3) {
        this.field3 = field3;
    }

    public Integer getField4() {
        return field4;
    }

    public void setField4(Integer field4) {
        this.field4 = field4;
    }

    public Integer getField5() {
        return field5;
    }

    public void setField5(Integer field5) {
        this.field5 = field5;
    }

    @ManyToOne
    @JoinColumn(name="field2")
    public Table1Entity getTable1() {
        return table1;
    }

    public void setTable1(Table1Entity table1) {
        this.table1 = table1;
    }
}
